package org.demo.spring.data.custom;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;


@Component
public class JDBCUtil {

    @Autowired
    private DataSource dataSource;


   public Connection getConnection() throws SQLException {
       Connection connection = dataSource.getConnection();
       return connection;
   }


}
